package java8_26;

/**
 * @author oldliu
 * @since 1.0
 */
public class Teacher {
    //姓名，年龄，教龄和性别
    private String name,sex;
    private int age,teachYears;

    public Teacher(String name, String sex, int age, int teachYears) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.teachYears = teachYears;
    }

    public void selfIntroduce(){
        System.out.println("老师名叫："+name);
        System.out.println("性别是"+sex);
        System.out.println("今年"+age+"，拥有教龄"+teachYears+"年");
    }
    public  void giveLession(){
        System.out.println(name+"老师在上课！");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getTeachYears() {
        return teachYears;
    }

    public void setTeachYears(int teachYears) {
        this.teachYears = teachYears;
    }
}
